package com.vichat.api.entity;


import javax.persistence.*;

/***************
 *author: autogen
 *version: 2017-12-18 13:03:06.644
 */
@Entity
@Table(name = "request_busi_record")
public class RequestBusiRecord implements java.io.Serializable{

	private static final long serialVersionUID = 1L;
	


    public static final String TABLE = "request_busi_record";

    /** */
	public static final String ALIAS_REQUEST_ID = "request_id";
    /** */
	public static final String ALIAS_JSON_ID = "json_id";
    /** */
	public static final String ALIAS_APP_ID = "app_id";
    /** */
	public static final String ALIAS_METHOD = "method";
    /** */
	public static final String ALIAS_SIGN = "sign";
    /** */
	public static final String ALIAS_TRANSACTION_ID = "transaction_id";
    /** */
	public static final String ALIAS_TIMESTAMP = "timestamp";
    /** */
	public static final String ALIAS_DONE_CODE = "done_code";
    /** */
	public static final String ALIAS_STATE = "state";
    /** */
	public static final String ALIAS_CREATE_TIME = "create_time";
	
	

 	@Id
@   GeneratedValue(strategy = GenerationType.IDENTITY)
	@Column(name = "request_id", unique = true, nullable = false)
    public Long requestId;

 	@Column(name = "json_id")
    public Long jsonId;

 	@Column(name = "app_id")
    public String appId;

 	@Column(name = "method")
    public String method;

 	@Column(name = "sign")
    public String sign;

 	@Column(name = "transaction_id")
    public String transactionId;

 	@Column(name = "timestamp")
    public String timestamp;

 	@Column(name = "done_code")
    public Long doneCode;

 	@Column(name = "state")
    public Long state;

 	@Temporal(TemporalType.TIMESTAMP)
	@Column(name = "create_time")
    public java.util.Date createTime;






	public Long getRequestId() {
		return this.requestId;
	}

	public void setRequestId(Long value) {
		this.requestId = value;
	}

	public Long getJsonId() {
		return this.jsonId;
	}

	public void setJsonId(Long value) {
		this.jsonId = value;
	}

	public String getAppId() {
		return this.appId;
	}

	public void setAppId(String value) {
		this.appId = value;
	}

	public String getMethod() {
		return this.method;
	}

	public void setMethod(String value) {
		this.method = value;
	}

	public String getSign() {
		return this.sign;
	}

	public void setSign(String value) {
		this.sign = value;
	}

	public String getTransactionId() {
		return this.transactionId;
	}

	public void setTransactionId(String value) {
		this.transactionId = value;
	}

	public String getTimestamp() {
		return this.timestamp;
	}

	public void setTimestamp(String value) {
		this.timestamp = value;
	}

	public Long getDoneCode() {
		return this.doneCode;
	}

	public void setDoneCode(Long value) {
		this.doneCode = value;
	}

	public Long getState() {
		return this.state;
	}

	public void setState(Long value) {
		this.state = value;
	}

	public java.util.Date getCreateTime() {
		return this.createTime;
	}

	public void setCreateTime(java.util.Date value) {
		this.createTime = value;
	}



	public RequestBusiRecord() {
	}

	public RequestBusiRecord(boolean qryflag) {
	    if(qryflag){
	    		this.requestId = null;
				this.jsonId = null;
				this.appId = null;
				this.method = null;
				this.sign = null;
				this.transactionId = null;
				this.timestamp = null;
				this.doneCode = null;
				this.state = null;
				this.createTime = null;
			    }
	}


	public RequestBusiRecord(
	    Long inRequestId,
	    Long inJsonId,
	    String inAppId,
	    String inMethod,
	    String inSign,
	    String inTransactionId,
	    String inTimestamp,
	    Long inDoneCode,
	    Long inState,
		java.util.Date inCreateTime
	 ) {
		super();
				this.requestId = inRequestId;
				this.jsonId = inJsonId;
				this.appId = inAppId;
				this.method = inMethod;
				this.sign = inSign;
				this.transactionId = inTransactionId;
				this.timestamp = inTimestamp;
				this.doneCode = inDoneCode;
				this.state = inState;
				this.createTime = inCreateTime;
			}


    @Transient
    private VichatJson edposJson;

    public VichatJson getEdposJson() {
        return edposJson;
    }

    public void setEdposJson(VichatJson edposJson) {
        this.edposJson = edposJson;
    }

    public String getRequestContent() {
        return requestContent;
    }

    public void setRequestContent(String requestContent) {
        this.requestContent = requestContent;
    }

    @Transient
    private String requestContent;


	public String getAppType() {
		return appType;
	}

	public void setAppType(String appType) {
		this.appType = appType;
	}

	private String appType = "C";//C: COMPANY  S:SYSTEM


 }

